<template>
    <el-upload
        :action="option.action" 
        :name="option.name" 
        :before-upload="option.before || (() => {})" 
        :on-success="option.success || (() => {})" 
        :on-error="option.error || (() => {})" 
        :show-file-list="false" 
        >
            <el-button 
                :type="option.type || 'primary'" 
                :plain="option.plain || false" 
                :round="option.round || false" 
                :circle="option.circle || false" 
                :disabled="option.disabled || false" 
                :icon="option.icon" 
                >
                {{option.text}}
            </el-button>
    </el-upload>
</template>
<script>
export default {
    name: 'iv-upload-btn',
    props: {
        option: {
            type: Object,
            default: () => {}
        }
    }
}
</script>

